// 插件
import demoPlugins from './modules/demo-plugins'
// 组件
import demoComponents from './modules/demo-components'
// 组件
import demoCharts from './modules/demo-charts'
// 组件库
import demoElement from './modules/demo-element'
// 组件库
import demoFilters from './modules/demo-filters'
// 试验台
import demoPlayground from './modules/demo-playground'
// 示例
import demoBusiness from './modules/demo-business'
// CRUD
import demoD2Crud from './modules/demo-d2-crud'
// 第三方网页
import demoFrame from './modules/demo-frame'

// 菜单 侧边栏
export const menuAside = [
  {
    path: '/study',
    title: '学习',
    icon: 'book',
    children: (pre => [
      {
        path: `${pre}chapter`,
        title: '章节',
        children: [
          { path: `${pre}chapter`, title: '章节列表' },
          { path: `${pre}chapter/edit`, title: '新建章节' }
        ]
      },
      {
        path: `${pre}course`,
        title: '课程',
        children: [
          { path: `${pre}course`, title: '课程列表' },
          { path: `${pre}course/edit`, title: '新建课程' }
        ]
      },
      {
        path: `${pre}category`,
        title: '分类',
        children: [
          { path: `${pre}category`, title: '分类列表' }
        ]
      },
      {
        title: '评论',
        path: `${pre}comment`,
        children: [
          { path: `${pre}comment`, title: '评论列表' }
        ]
      },
      {
        path: `${pre}blockinfo`,
        title: '焦点图',
        children: [
          { path: `${pre}blockinfo`, title: '焦点图列表' }
        ]
      }
    ])('/study/')
  },
  {
    path: '/find',
    title: '发现',
    icon: 'compass',
    children: (pre => [
      {
        path: `${pre}`,
        title: '发现',
        children: [
          { path: `${pre}list`, title: '发现列表' },
          { path: `${pre}edit`, title: '新建发现' }
        ]
      }
    ])('/find/')
  },
  {
    path: '/user',
    title: '用户',
    icon: 'user',
    children: (pre => [
      {
        path: `${pre}`,
        title: '用户',
        children: [
          { path: `${pre}list`, title: '用户列表' }
        ]
      }
    ])('/user/')
  },
  {
    path: '/activity',
    title: '活动',
    icon: 'bullhorn',
    children: (pre => [
      {
        path: `${pre}`,
        title: '活动',
        children: [
          { path: `${pre}list`, title: '活动列表' },
          { path: `${pre}organizations`, title: '活动举办方' }
        ]
      }
    ])('/activity/')
  }, {
    path: '/sales',
    title: '销售',
    icon: 'cart-plus',
    children: (pre => [{
      path: `list`,
      title: '销售',
      children: [
        { path: `${pre}list`, title: '销售列表' }
      ]
    }])('/sales/')
  }, {
    path: '/agent',
    title: '代理商',
    icon: 'user-circle',
    children: (pre => [{
      path: `${pre}`,
      title: '代理商',
      children: [
        { path: `${pre}list`, title: '代理商列表' }
      ]
    }])('/agent/')
  }, {
    path: '/fiance',
    title: '财务',
    icon: 'jpy',
    children: (pre => [{
      path: `${pre}`,
      title: '财务',
      children: [
        { path: `${pre}list`, title: '财务对账单' }
      ]
    }])('/fiance/')
  }, {
    path: '/help',
    title: '帮助',
    icon: 'question-circle',
    children: (pre => [{
      path: `${pre}`,
      title: '帮助',
      children: [
        { path: `${pre}list`, title: '用户反馈列表' }
      ]
    }])('/help/')
  }
  // ,
  // demoComponents,
  // demoPlugins,
  // demoCharts,
  // demoElement,
  // demoFilters,
  // demoPlayground,
  // demoBusiness,
  // demoD2Crud,
  // demoFrame
]

// 菜单 顶栏
export const menuHeader = [
  {
    path: '/index',
    title: '首页',
    icon: 'home'
  },
  {
    title: '功能',
    icon: 'puzzle-piece',
    children: [
      demoD2Crud,
      demoComponents,
      demoFilters,
      demoElement,
      demoCharts,
      demoPlugins,
      demoFrame,
      {
        title: '新窗口打开链接',
        icon: 'link',
        children: [
          { path: 'https://github.com/d2-projects/d2-admin', title: 'D2Admin Github', icon: 'github' },
          { path: 'https://juejin.im/user/57a48b632e958a006691b946/posts', title: '掘金', icon: 'globe' },
          { path: 'https://my.oschina.net/u/3871516', title: '开源中国', icon: 'globe' },
          { path: 'https://www.zhihu.com/people/fairy-ever/activities', title: '知乎', icon: 'globe' },
          { path: 'https://segmentfault.com/blog/liyang-note-book', title: 'segmentfault 专栏', icon: 'globe' },
          { path: 'http://www.fairyever.com/', title: 'www.fairyever.com', icon: 'globe' }
        ]
      }
    ]
  },
  demoPlayground,
  demoBusiness
]
